<cfparam name="country" default="United States">
<cfparam name="selectedstate" default="">

<cfinvoke component = "cfcs.common.shared" method="getstates" country="#country#" returnvariable="liststates">

<cfif listlen(liststates) IS 0>
	<cfoutput><input type = "text" width="25" name="state" value="#selectedstate#" /></cfoutput>
<cfelse>
	<select name = "state" id="state">
    <cfloop list="#liststates#" delimiters="," index="s">
    	<cfoutput><option value="#trim(replace(s, '*', ''))#" <cfif selectedstate IS #trim(replace(s, '*', ''))#>selected="selected"</cfif>>#trim(replace(s, '*', ''))#</option></cfoutput>
    </cfloop>
    </select>
</cfif>